import request from "../utils/request";
import qs from 'querystring'

//验证商家手机号是否已注册
export const shopTel = (data:any) => {
    return request({
        url:`/gen/apply/shop/tel/${data}`,
        method:'get',
    })
}

//查看店铺名是否已注册
export const shopName = (data:any) =>{
    return request({
        url:`/gen/apply/shop/shopname/${data}`,
        method:'get',
    })
}

//新增店铺或充电站
export const addShop = (data:any) => {
    return request({
        url:"/gen/apply/shop",
        method:'post',
        data
    })
}

//获取所有商铺信息
export const getApplt = (data:any) => {
    const val = qs.stringify(data)
    return request({
        url:`/gen/apply?${val}`,
        method:'get',
    })
}


//修改商铺状态
export const setAppltStatus = (data:any) => {
    return request({
        url:`/gen/apply`,
        method:'put',
        data
    })
}